package factory.funfactory;

import factory.goods.*;

/**
 * User:xuzhidian
 * Date:2018/3/13
 * Time:22:30
 */
public class ChicagoStylePizzaStore extends AbstractPizzaStore {
    @Override
    protected IPizza createPizza(String type) {
        IPizza pizza;
        if (type.equals("cheese")) {
            pizza = new ChicagoStyleCheesePizza();
        } else if (type.equals("pepperoni")) {
            pizza = new ChicagoStylePepperoniPizza();
        } else {
            pizza = new Pizza();
        }
        pizza.prepare();
        pizza.bake();
        pizza.cut();
        pizza.box();
        return pizza;
    }
}
